<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>test</title>
    <link rel="stylesheet" type="text/css" media="all" href="/static/layui/css/layui.css"/>
    <link rel="stylesheet" type="text/css" media="all" href="/static/css/common.css"/>
    <link rel="stylesheet" type="text/css" media="all" href="/static/js/jquery.min.js"/>

<body>
    <div class="layui-fluid">
            <div class="layui-row">
                    <div class="layui-col-sm12">
                        <!--标题-->
                        <div style="width: 80px; font-weight: bolder; font-size: large; margin-top: 20px; margin-left: auto; margin-right: auto">Case列表</div>
                        <br/>
                        <div class="layui-col-xs1">
                            <i class="layui-icon">&#xe770;</i>
                            登陆:<input type="text" name="person" autocomplete="off" class="layui-input" placeholder="用户名" style="right: 20px"/>
                            <div><input class="layui-btn-normal" type="submit" value="提交" style="width: 100px"></div>
                            <div><input class="layui-btn-normal" type="reset" value="重置"style="width: 100px;"></div>
                        </div>
                        <div class="layui-col-xs10">
                              <div class="layui-col-md-offset12">
                                 <form enctype="multipart/form-data" action="/file/uploadFile" style="  width: 100px;margin-top:10px;" method="POST">
                                      {% csrf_token %}
                                     <div class="layui-anim-fadein">
                                         <input class="layui-btn  " type="file" name="myfile" style="width: 100px;" />
                                     </div>
                                     <div>
                                         <input class="layui-btn layui-btn-primary" type="submit" value="上传" style="width: 100px"/>
                                     </div>

                                  </form>
                              </div>
                        </div><br/>
                        <div class="layui-col-xs3">
                            <form action="/Case/GetCaseByID" method="get">
                                搜索ID
                                <div class="layui-inline">
                                    <input class="layui-input" type="text" name="id" id="idReload" />
                                </div>
                                 <input class="layui-btn layui-btn-warm" type="submit"value="收拾">
                            </form>
                        </div>
                <div class="layui-col-xs3">
                    <div class="demoTable">
                        上传人：
                        <div class="layui-inline">
                            <input class="layui-input" name="id" id="idReload" autocomplete="off" />
                        </div>
                        <button class="layui-btn layui-btn-warm" data-type="SearchPersion">搜索</button>
                    </div>
                </div>
                <div class="layui-col-xs3">
                            <div class="demoTable">
                                文件名：
                                <div class="layui-inline">
                                    <input class="layui-input" name="id" id="idReload" autocomplete="off" />
                                </div>
                                <button class="layui-btn layui-btn-warm" data-type="SearchFile">搜索</button>
                            </div>
                    </div>
            </div>
        <table class="layui-table " lay-skin="line">
            <div>
                <thead>
                <tr>
                    <th lay-data="{field:'id', width:80, sort: true}">ID</th>
                    <th lay-data="{field:'FileName', width:80}">文件名</th>
                    <th lay-data="{field:'FileContext', width:80, sort: true}">文件解释</th>
                    <th lay-data="{field:'PersonName'}">上传人</th>
                    <th lay-data="{field:'ProjectName'}">项目名称</th>
                    <th lay-data="{field:'Status', sort: true}">是否启用</th>
                    <th lay-data="{field:'CreateTime', sort: true}">创建时间</th>
                    <th lay-data="{field:'id', width:10,}">运行</th>
                    <th lay-data="{field:'id', width:10,}">编辑</th>
                </tr>
                {% for i in contacts  %}
                    <tr>
                        <p>
                        <td>{{ i.id }}</td>
                        <td>{{ i.FileName }}</td>
                        <td>{{ i.FileContext }}</td>
                        <td>{{ i.PersonName }}</td>
                        <td>{{ i.ProjectName }}</td>
                        <td>{{ i.Status }}</td>
                        <td>{{ i.CreateTime }}</td>
                        <td><button value={{ i.id }} class="layui-btn" data-type="run">运行</button></td>
                        <td><button value={{ i.id }} class="layui-btn" data-type="Edit">编辑</button></td>
                        </p>
                    </tr>
                {% endfor %}
                </thead>
            </div>
        </table>
        <div class="pagination">
            <span class="step-links">
                {% if contacts.has_previous %}
                    <a href="?page={{ contacts.previous_page_number }}">上一页</a>
                {% endif %}
                <span class="current">
                    第 {{ contacts.number }} 页，共 {{ contacts.paginator.num_pages }}页.
                </span>
                {% if contacts.has_next %}
                    <a href="?page={{ contacts.next_page_number }}">下一页</a>
                {% endif %}
            </span>
        </div>
    </div>
    </div>
    </div>
    </div>
    <div class="fly-footer" style="margin-right: auto; margin-left: auto; width: 200px;">
        <p><a href="#" target="_blank">我打 - 测试部</a> 2018</p>
    </div>
    <script type="text/javascript" src="/static/layui/layui.all.js"></script>
    <script type="text/javascript" src="/static/js/jquery.min.js"></script>
    <script>
          {#function SearchID_Click() {#}
          {##}
          {#      var ID = document.getElementById("idReload").value;#}
          {#      $.ajax({#}
          {#          type:'GET',#}
          {#          url :'/Case/GetCaseByID',#}
          {#          data : {'SearchID':ID},#}
          {#          cache:false,#}
          {#          dataType: "html",#}
          {#          success:function (callback) {#}
          {#              $('.callback').html();#}
          {#          }#}
          {#      })#}
               {#$.get("/Case/GetCaseByID", {'SearchID':ID});#}
          {# }#}
    </script>
</head>
</body>



</html>